import 'dart:core';

import '../utils/screw.dart';

class MacItem {
  int id;
  String department;
  String name;
  String device;
  String mac;

  MacItem({this.id, this.department, this.name, this.device, this.mac});

  bool isEqual(MacItem another) {
    var firstBody = department + name + device + mac;
    var firstSign = Screw.genMD5(firstBody);
    var secondBody =
        another.department + another.name + another.device + another.mac;
    var secondSign = Screw.genMD5(secondBody);
    return firstSign == secondSign;
  }

  String get body => '$department ,$device, $mac';
}
